class Solution:
    def isAnagram(self, s: str, t: str) -> bool:
        mapper={}
        for i in s:
            try:
                mapper[i]+=1
            except:
                mapper[i]=1
        for j in t:
            try:
                mapper[j]-=1
            except:
                return False
        for (i,j) in mapper.items():
            if j!=0:
                return False
        return True